-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix URL encoded filenames #104
Conversation
for more information, see https://pre-commit.ci
Thanks for fixing the decode; would you mind adding a changelog entry and test? |
Sure. About the changelog, where should I write it? I guess that inside CHANGELOG.rst but should I create a write it inside 2.4.0 or create a new 2.4.1 section? |
Oh yeah, looks like I've forgotten to create a new heading! Please do! |
Done! |
def entries_url_format(): | ||
return [ | ||
ParserEntry(name="foo", type="Method", path="foo%20bar.html#foo"), | ||
ParserEntry(name="qux", type="Class", path="foo%20bar.html"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's a point to making this a fixture? I think it can be safely inlined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can just add a new entry in the entries
fixture but I wanted to have a separate test just for checking URL-encoded filenames. I see know it can be done without a new fixture. Give me a sec.
toc.send(e) | ||
toc.close() | ||
assert [ | ||
TOCEntry(name="foo", type="Method", anchor="foo") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait, doesn't this mean that you've lost a TOCEntry somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm lost on writing a test. I though I could just add a new entry to the entries
fixture, copy the test_single_entry
test in test_utils.py
and change it so it checks all the entries have been correctly parsed. But I don't understand what is happenning in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I’ll have a look after Xmas. Happy holidays and thanks for your work so far!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, and happy holidays to you too!
Co-authored-by: Hynek Schlawack <hs@ox.cx>
@hynek any new on this? in jcmgray/quimb#108 we are waiting on this PR to be merged. |
I couldn't push it against your branch so I've fixed and merged it by hand in d8b770b – thanks! |
(looks like github didn't recognize your git identity so I've force pushed (😱) 158d7dc) |
about my git identity i don't know what happened 😨 |
I was trying to use
doc2dash
with the documentation of quimb but the screen show the following error.Problem was that the repo generates some HTML files with spaces in their names and other files referencing to them encodes their names in URL form. Adding a URL decoding step solves the problem and does not interfere with other filenames.